﻿<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,inital-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no, email=no" />
<title>AG198澳新跨境</title>
<link href="css/reset.css" rel="stylesheet" type="text/css" />
<link href="css/css.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.mobile.min.js"></script>
<script language="javascript" type="text/javascript" src="js/base.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.lazyload.js"></script>
</head>

<body>
<div class="layer" id="layer">
<div class="title">
<span class="name">海关规定：</span>
<span class="close-btn"><i class="ico-close icon"></i></span>
</div>
<div class="text-box">
<p>① 消费者购买进口商品，以"个人自用，合理数量"为原则，每单最大购买限额为1000元人民币。</p>
<p>② 如果订单只含单件不可分割商品，则可以超过1000元限值。</p>
</div>
<div class="layer-bot">
<button class="btns ok br-line">确定</button>
<button class="btns cancel">取消</button>
</div>
</div>
<div class="layer-bg" id="layer-bg"></div>

<div class="wrap clearfix">
<header class="header bgf">
<div class="name">购物车</div>
<span class="back" id="back"><i class="icon-back icon"></i></span>
</header>
<div class="clear"></div>
<!-- header end -->

<div class="car box clearfix">
<div class="car-title"><label class="ico-check "><input type="checkbox" class="Choose_all"></label>海外直供杭州保税区1号发货仓</div>
<ul class="car-list">
<li class="clearfix">
<div class="slide">
<div class="item item1"><label class="ico-check"><input type="checkbox" class="Choose"></label></div>
<div class="item item2"><a href="show.html"><img src="images/grey.gif" class="lazy" data-original="images/p1.jpg" /></a></div>
<div class="item item3">
<div class="name box-sizing"><a href="show.html">美国 Herbalife 康宝莱 奶昔蛋白混合饮料快速减重 750g香草味</a></div>
<div class="item num"><b class="black">¥ <font class="unit">58.00</font></b><br>× <font class="u-num">1</font></div>
<div class="clear"></div>
<div class="opns">
<div class="amount">
    <a href="#" class="Increase"><i class="icon"></i></a>
    <input value="1" type="text" class="inputs">
    <a href="#" class="Reduce"><i class="icon"></i></a>
    </div>
<a href="javascript:void(0);" class="del"><i class="ico-del icon"></i></a>
</div>
</div>
</div>
</li>

<li class="clearfix">
<div class="slide">
<div class="item item1"><label class="ico-check"><input type="checkbox" class="Choose"></label></div>
<div class="item item2"><a href="show.html"><img src="images/grey.gif" class="lazy" data-original="images/p17.jpg" /></a></div>
<div class="item item3">
<div class="name box-sizing"><a href="show.html">美国 Herbalife 康宝莱 奶昔蛋白混合饮料快速减重 750g香草味</a></div>
<div class="item num"><b class="black">¥ <font class="unit">58.00</font></b><br>× <font class="u-num">1</font></div>
<div class="clear"></div>
<div class="opns">
<div class="amount">
    <a href="#" class="Increase"><i class="icon"></i></a>
    <input value="1" type="text" class="inputs">
    <a href="#" class="Reduce"><i class="icon"></i></a>
    </div>
<a href="javascript:void(0);" class="del"><i class="ico-del icon"></i></a>
</div>
</div>
</div>
</li>
<li class="clearfix">
<div class="slide">
<div class="item item1"><label class="ico-check"><input type="checkbox" class="Choose"></label></div>
<div class="item item2"><a href="show.html"><img src="images/grey.gif" class="lazy" data-original="images/p18.jpg" /></a></div>
<div class="item item3">
<div class="name box-sizing"><a href="show.html">美国 Herbalife 康宝莱 奶昔蛋白混合饮料快速减重 750g香草味</a></div>
<div class="item num"><b class="black">¥ <font class="unit">58.00</font></b><br>× <font class="u-num">1</font></div>
<div class="clear"></div>
<div class="opns">
<div class="amount">
    <a href="#" class="Increase"><i class="icon"></i></a>
    <input value="1" type="text" class="inputs">
    <a href="#" class="Reduce"><i class="icon"></i></a>
    </div>
<a href="javascript:void(0);" class="del"><i class="ico-del icon"></i></a>
</div>
</div>
</div>
</li>
<li class="clearfix">
<div class="slide">
<div class="item item1"><label class="ico-check"><input type="checkbox" class="Choose"></label></div>
<div class="item item2"><a href="show.html"><img src="images/grey.gif" class="lazy" data-original="images/p22.jpg" /></a></div>
<div class="item item3">
<div class="name box-sizing"><a href="show.html">美国 Herbalife 康宝莱 奶昔蛋白混合饮料快速减重 750g香草味</a></div>
<div class="item num"><b class="black">¥ <font class="unit">58.00</font></b><br>× <font class="u-num">1</font></div>
<div class="clear"></div>
<div class="opns">
<div class="amount">
    <a href="#" class="Increase"><i class="icon"></i></a>
    <input value="1" type="text" class="inputs">
    <a href="#" class="Reduce"><i class="icon"></i></a>
    </div>
<a href="javascript:void(0);" class="del"><i class="ico-del icon"></i></a>
</div>
</div>
</div>
</li>
</ul>
<div class="counts clearfix">
<div class="item itme1"><span class="black">已选商品 <font class="t-number">0</font> 件</span></div>
<div class="item item3">
&yen; <font class="c-price">0.00</font><br>
&yen; <font class="c-tariff">10.00</font><br>
- &yen; <font class="d-count">20.00</font><br>
<b class="red">&yen; <font class="t-price">0.00</font></b>
</div>
<div class="item item2">
商品总额：<br>
关税：<br>
活动优惠：<br>
<span class="black">总计(不含运费、税费)：</span>
</div>
<div class="clear"></div>
<div class="limit-money">
您已超过海关限额<b class="red">￥1000</b>，请选择部分商品进行结算<br>
<span class="red"><i class="icon-16 icon icon-view"></i>查看海关规定</span></div>
<div class="opn"><a href="order.html" class="btn">去结算</a></div>
</div>
</div>


<div class="car box  mt10 clearfix">
<div class="car-title"><label class="ico-check "><input type="checkbox" class="Choose_all"></label>海外直供杭州保税区1号发货仓</div>
<ul class="car-list">
<li class="clearfix">
<div class="slide">
<div class="item item1"><label class="ico-check"><input type="checkbox" class="Choose"></label></div>
<div class="item item2"><a href="show.html"><img src="images/grey.gif" class="lazy" data-original="images/p28.jpg" /></a></div>
<div class="item item3">
<div class="name box-sizing"><a href="show.html">美国 Herbalife 康宝莱 奶昔蛋白混合饮料快速减重 750g香草味</a></div>
<div class="item num"><b class="black">¥ <font class="unit">258</font></b><br>× <font class="u-num">1</font></div>
<div class="clear"></div>
<div class="opns">
<div class="amount">
    <a href="#" class="Increase"><i class="icon"></i></a>
    <input value="1" type="text" class="inputs">
    <a href="#" class="Reduce"><i class="icon"></i></a>
    </div>
<a href="javascript:void(0);" class="del"><i class="ico-del icon"></i></a>
</div>
</div>
</div>
</li>

<li class="clearfix">
<div class="slide">
<div class="item item1"><label class="ico-check"><input type="checkbox" class="Choose"></label></div>
<div class="item item2"><a href="show.html"><img src="images/grey.gif" class="lazy" data-original="images/p27.jpg" /></a></div>
<div class="item item3">
<div class="name box-sizing"><a href="show.html">美国 Herbalife 康宝莱 奶昔蛋白混合饮料快速减重 750g香草味</a></div>
<div class="item num"><b class="black">¥ <font class="unit">258</font></b><br>× <font class="u-num">1</font></div>
<div class="clear"></div>
<div class="opns">
<div class="amount">
    <a href="#" class="Increase"><i class="icon"></i></a>
    <input value="1" type="text" class="inputs">
    <a href="#" class="Reduce"><i class="icon"></i></a>
    </div>
<a href="javascript:void(0);" class="del"><i class="ico-del icon"></i></a>
</div>
</div>
</div>
</li>
<li class="clearfix">
<div class="slide">
<div class="item item1"><label class="ico-check"><input type="checkbox" class="Choose"></label></div>
<div class="item item2"><a href="show.html"><img src="images/grey.gif" class="lazy" data-original="images/p25.jpg" /></a></div>
<div class="item item3">
<div class="name box-sizing"><a href="show.html">美国 Herbalife 康宝莱 奶昔蛋白混合饮料快速减重 750g香草味</a></div>
<div class="item num"><b class="black">¥ <font class="unit">258</font></b><br>× <font class="u-num">1</font></div>
<div class="clear"></div>
<div class="opns">
<div class="amount">
    <a href="#" class="Increase"><i class="icon"></i></a>
    <input value="1" type="text" class="inputs">
    <a href="#" class="Reduce"><i class="icon"></i></a>
    </div>
<a href="javascript:void(0);" class="del"><i class="ico-del icon"></i></a>
</div>
</div>
</div>
</li>
<li class="clearfix">
<div class="slide">
<div class="item item1"><label class="ico-check"><input type="checkbox" class="Choose"></label></div>
<div class="item item2"><a href="show.html"><img src="images/grey.gif" class="lazy" data-original="images/p26.jpg" /></a></div>
<div class="item item3">
<div class="name box-sizing"><a href="show.html">美国 Herbalife 康宝莱 奶昔蛋白混合饮料快速减重 750g香草味</a></div>
<div class="item num"><b class="black">¥ <font class="unit">258</font></b><br>× <font class="u-num">1</font></div>
<div class="clear"></div>
<div class="opns">
<div class="amount">
    <a href="#" class="Increase"><i class="icon"></i></a>
    <input value="1" type="text" class="inputs">
    <a href="#" class="Reduce"><i class="icon"></i></a>
    </div>
<a href="javascript:void(0);" class="del"><i class="ico-del icon"></i></a>
</div>
</div>
</div>
</li>
</ul>
<div class="counts clearfix">
<div class="item itme1"><span class="black">已选商品 <font class="t-number">0</font> 件</span></div>
<div class="item item3">
&yen; <font class="c-price">0.00</font><br>
&yen; <font class="c-tariff">10.00</font><br>
- &yen; <font class="d-count">20.00</font><br>
<b class="red">&yen; <font class="t-price">0.00</font></b>
</div>
<div class="item item2">
商品总额：<br>
关税：<br>
活动优惠：<br>
<span class="black">总计(不含运费、税费)：</span>
</div>
<div class="clear"></div>
<div class="limit-money">
您已超过海关限额<b class="red">￥1000</b>，请选择部分商品进行结算<br>
<span class="red"><i class="icon-16 icon icon-view"></i>查看海关规定</span></div>
<div class="opn"><a href="order.html" class="btn">去结算</a></div>
</div>
</div>

<div class="exit-opn mb10"><a href="car-none.html" class="btn Large">购物车为空页面，点这里</a></div>

<!-- footer begin -->
<div class="clear"></div>
<nav class="bot-nav">
<a href="index.html" class="tab"><i class="icon-home icon"></i><p>首页</p></a>
<a href="class.html" class="tab"><i class="icon-sort icon"></i><p>分类</p></a>
<a href="car.html" class="tab active"><i class="icon-car icon"></i><p>购物车</p></a>
<a href="login.html" class="tab"><i class="icon-user icon"></i><p>我的</p></a>
</nav>
</div>
<script>
//图片懒加载
$("img.lazy").lazyload({
	 effect:"fadeIn",
	 threshold:1000,
	 });

function count_price(idn){
	var JQ1=$(idn).find(".Choose");
	var JQ2=idn.find(".Choose_all");
	var JQ_Tprice=$(idn).find(".t-price");
	var JQ_Cprice=$(idn).find(".c-price");
	var JQ_Ctariff=$(idn).find(".c-tariff");
	var JQ_Dcount=$(idn).find(".d-count");
	var JQ_Tnumber=$(idn).find(".t-number");
	var Choose_count=JQ1.length;
	var count=0,Uprice,Tnumber=0,Tprice,Ctariff,Dcount;
	JQ1.each(function(idx){
		if($(this).is(':checked')){
		var jqli=$(this).parents("li");
		Uprice=parseFloat($(jqli).find(".unit").text())*parseFloat($(jqli).find(".u-num").text());
		count+=Uprice;
		Tnumber++;
		}
		});
	if(Tnumber==Choose_count){
		JQ2.prop("checked",true);
		JQ2.parent(".ico-check").addClass("active");
		}
	else{
		JQ2.prop("checked",false);
		JQ2.parent(".ico-check").removeClass("active");
		}
	$(JQ_Cprice).text(count.toFixed(2));
	Ctariff=parseFloat($(JQ_Ctariff).text());
	Dcount=parseFloat($(JQ_Dcount).text());
	Tprice=count+Ctariff-Dcount;
	$(JQ_Tprice).text(Tprice.toFixed(2));
	$(JQ_Tnumber).text(Tnumber);
	if(count>1000){
		$(idn).find(".limit-money").show();
		}
	else{
		$(idn).find(".limit-money").hide();
		}
	}
	
function Choose_all(that,idn){
	var JQ1=idn.find(".Choose");
	var JQ2=idn.find(".Choose_all");
	if($(that).prop("checked")){
	JQ1.prop("checked",true);
	JQ2.prop("checked",true);
	JQ1.parent(".ico-check").addClass("active");
	JQ2.parent(".ico-check").addClass("active");
	count_price(idn);
	}
	else{
	JQ1.parent(".ico-check").removeClass("active");
	JQ2.parent(".ico-check").removeClass("active");
	JQ1.prop("checked",false);
	JQ2.prop("checked",false);
	count_price(idn);
		}
	}

function Choose(that,idn){
	if($(that).prop("checked")){
		$(that).prop("checked",true);
		$(that).parent(".ico-check").addClass("active");
		count_price(idn);
	}
	else{
		$(that).prop("checked",false);
		$(that).parent(".ico-check").removeClass("active");
		count_price(idn);
		}
	}
		
$(function(){
	
$(".Choose_all").bind({
	change:function(){
		var JQ=$(this).parents(".car");
		Choose_all(this,JQ)
		}
	});

$(".Choose").bind({
	change:function(){
		var JQ=$(this).parents(".car");
		Choose(this,JQ)
		}
	});
		
$(".car .Increase").bind({
		tap:function(){
			var jqnum=$(this).parents("li").find(".u-num");
			var num=parseInt($(this).next(".inputs").val());
			num+=1;
			$(this).next(".inputs").val(num);
			$(jqnum).text(num);
			var idn=$(this).parents(".car");
			count_price(idn);
			return false;
			}
		});
		
$(".car .Reduce").bind({
		tap:function(){
			var jqnum=$(this).parents("li").find(".u-num");
			var num=parseInt($(this).prev(".inputs").val());
			num-=1;
			if(num<=0) num=1; 
			$(this).prev(".inputs").val(num);
			$(jqnum).text(num);
			var idn=$(this).parents(".car");
			count_price(idn);
			return false;
			}
		});
$(".Choose").click();

$(".limit-money").bind({
	tap:function(){
		openlayer("layer","layer-bg");
		}
	});
	});
</script>
</body>
</html>